<?php
/* @var $this ShopController */
/* @var $model Shop */
/* @var $form CActiveForm */
?>
<script src="<?php echo Yii::app()->baseUrl . '/ckeditor/ckeditor.js'; ?>"></script>
<div class="form">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'shop-_shop-form',
        // Please note: When you enable ajax validation, make sure the corresponding
        // controller action is handling ajax validation correctly.
        // See class documentation of CActiveForm for details on this,
        // you need to use the performAjaxValidation()-method described there.
        'enableAjaxValidation' => false,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
    ));
    ?>



    <div class="form_left">
        <?php echo $form->labelEx($model, 'shopName'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'shopName', array('size' => 60, 'maxlength' => 100, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'shopName'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'shopCode'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'shopCode', array('size' => 60, 'maxlength' => 100, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'shopCode'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'phone'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'phone',array('size' => 32, 'maxlength' => 50, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'phone'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'avata'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->fileField($model, 'avata',array('size' => 40, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'avata'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'logo'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->fileField($model, 'logo',array('size' => 40, 'maxlength' => 50)); ?>
        <?php echo $form->error($model, 'logo'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'url_logo'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'url_logo',array('size' => 60, 'maxlength' => 200, 'required' => 'required')); ?>
        <?php echo $form->error($model, 'url_logo'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'facebook'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'facebook',array('size' => 60, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'facebook'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'google',array('size' => 60, 'maxlength' => 200)); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'google',array('size' => 60, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'google'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'twitter'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'twitter',array('size' => 60, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'twitter'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'yotube'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'yotube',array('size' => 60, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'yotube'); ?>
    </div>

    <div class="clear"></div>
    
    <div class="form_left">
        <?php echo $form->labelEx($model, 'address'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textField($model, 'address',array('size' => 60, 'maxlength' => 200)); ?>
        <?php echo $form->error($model, 'address'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'metakeyword'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'metakeyword',array('style' => 'width: 400px; height: 50px;', 'maxlength' => 300)); ?>
        <?php echo $form->error($model, 'metakeyword'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'metadisception'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'metadisception',array('style' => 'width: 400px; height: 100px;', 'maxlength' => 500)); ?>
        <?php echo $form->error($model, 'metadisception'); ?>
    </div>

    <div class="clear"></div>
    <div class="form_left">
        <?php echo $form->labelEx($model, 'footer'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->textArea($model, 'footer',array('id' => 'editor1')); ?>
        <?php echo $form->error($model, 'footer'); ?>
    </div>

    <div class="form_left">
        <?php echo $form->labelEx($model, 'flag'); ?>
    </div>
    <div class="form_right">
        <?php echo $form->dropDownList($model, 'flag', array('1' => 'Đang hiện', '4' => 'Tạm ngưng')); ?>
        <?php echo $form->error($model, 'flag'); ?>
    </div>
    <div class="clear"></div>
    <div class="form_left">.</div>
    <div class="row buttons">
        <?php echo CHtml::submitButton('Cập nhật'); ?>
    </div>

    <?php $this->endWidget(); ?>
    <script type="text/javascript">
        CKEDITOR.replace('editor1', {
            filebrowserBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=files',
            filebrowserImageBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=images',
            filebrowserFlashBrowseUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/browse.php?type=flash',
            filebrowserUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=files',
            filebrowserImageUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=images',
            filebrowserFlashUploadUrl: '<?php echo Yii::app()->baseUrl; ?>/kcfinder_1/upload.php?type=flash'
        });
    </script>
</div><!-- form -->